<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
<title>收入明细</title>
<link rel="stylesheet" type="text/css" href="../../css/aui-flex.css" />
<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
<link rel="stylesheet" type="text/css" href="../../css/common.css" />
<style>
body{
	background: #F5F7F8 !important;
}
.aui-tab .aui-tab-item {
	color: #ADADAD;
}
.aui-tab .aui-tab-item.aui-active:before {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	background: #E63350;
	height: 0.1rem;
	width: 43%;
	-webkit-transform: translateX(-50%);
	transform: translateX(-50%);
}
#item-tab{
	padding-right: 0.7rem;
	margin-bottom:0.2rem;
}
#item-tab .aui-tab-item.active{
	color: #333;
	font-weight: bold;
}
.info-list{
	height: 3.2rem;
	background: #fff;
	padding: 0 0.8rem;
}
.border-b{
	border-bottom: 1px solid #E7E7E7;

}
.head{
	height: 2rem;
	width: 2rem;
	margin-right: 0.4rem;
}
/*.imgH{
	height: 0.6rem;
	margin-left: 0.3rem;
	vertical-align: -3px;
}*/
.log {
	width: 5rem;
	/*display: inline-block;*/
	/*margin-left: 0.3rem;*/
}

.log.tag-pt {
	/*background: url('../../image/mine/m_icon23.png') no-repeat center;
	background-size: auto 0.6rem;*/
}

.log.tag-vip {
	/*background: url('../../image/mine/m_icon22.png') no-repeat center;
	background-size: auto 0.6rem;*/
}

.log.tag-y {
	/*background: url('../../image/mine/m_icon24.png') no-repeat center;
	background-size: auto 0.6rem;*/
}
.black{
	height: 4.6rem;
}
</style>
</head>
<body>
	<div class="topFix">
		<div class="aui-tab aui-border-b" id="type-tab">
				<div class="aui-tab-item aui-active" tapmode onClick="openTeam(0);">A级团队(<span id="a">0</span>)</div>
				<div class="aui-tab-item" tapmode onClick="openTeam(1);">B级团队(<span id="b">0</span>)</div>
		</div>
		<div class="aui-tab" id="item-tab">
				<div class="aui-tab-item active" tapmode onClick="itemTab(0);">全部</div>
				<div class="aui-tab-item" tapmode onClick="itemTab(1);">普通会员</div>
				<div class="aui-tab-item" tapmode onClick="itemTab(2);">黄金会员</div>
				<div class="aui-tab-item" tapmode onClick="itemTab(3);">铂金会员</div>
				<div class="aui-tab-item aui-ellipsis" tapmode onClick="itemTab(4);">钻石会员</div>
		</div>
	</div>
	<div class="black"></div>
	<div id="list_html"></div>
	<script type="text/x-dot-template" id="list_tpl">
	{{ for(var i in it) { }}
	<div class="info-list border-b comFlexItem" data-team="{{=it[i].team}}" data-type="{{=it[i].type}}">
		<div class="rsdius head"><img src="{{=it[i].user_avatar}}" class="radius" alt=""></div>
		<div class="flex-auto">
			<div class="aui-flex-col aui-font-size-14 color-333" style="flex-direction: column ">{{=it[i].user_nickname}}
				{{ if( it[i].user_vip == 1){ }}
					<p class="log tag-pt">普通</p>
				{{ }else if( it[i].user_vip == 2){ }}
					<p class="log tag-vip">黄金</p>
				{{ }else if( it[i].user_vip == 3){ }}
					<p class="log tag-y">铂金</p>
				{{ }else if( it[i].user_vip == 4){ }}
					<p class="log">钻石</p>
				{{ } }}
			</div>
			<p class="aui-font-size-12 color-ad">ID：{{=it[i].userid}}</p>
		</div>
		<div class="aui-font-size-12 color-ad">{{=it[i].user_updatetime}}</div>
	</div>
	{{}}}
	</script>
</body>
<script type="text/javascript" src="../../script/import.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript">
var TEAM_TYPE = 1;
var ITEM_TYPE = 0;
apiready = function(){
	api.parseTapmode();
	getTeamList()
};
function openTeam(ind) {
	$$('#type-tab > div').removeClass('aui-active').eq(ind).addClass('aui-active');
	changeTeam(ind);
}
function itemTab(ind) {
	$$('#item-tab > div').removeClass('active').eq(ind).addClass('active');
	changeItem(ind);
}
// 运营商类型
// var USER_VIP = 1;
// function vipStaCls(){
// 	var clss= '';
// 	if(USER_VIP){
// 		clss = 'tag-pt';
// 	}else if(USER_VIP == 2){
// 		clss = 'tag-vip'
// 	}else if(USER_VIP == 3){
// 		clss = 'tag-y'
// 	}else if(USER_VIP == 4){
// 		clss = 'tag-cj'
// 	}
// 	return clss;
// }
//切换团队
function changeTeam(n){
	switch (n) {
		case 0:
			TEAM_TYPE = 1;
			break;
		case 1:
			TEAM_TYPE = 2;
			break;
		default:
			TEAM_TYPE = 1;
	}
	getTeamList();
}
function changeItem(n){
	switch (n) {
		case 0:
			ITEM_TYPE = 0;
			break;
		case 1:
			ITEM_TYPE = 1;
			break;
		case 2:
			ITEM_TYPE = 2;
			break;
		case 3:
			ITEM_TYPE = 3;
			break;
		default:
			ITEM_TYPE = 0;
	}
	getTeamList();
}
//获取订单列表
function getTeamList(){
	if(ITEM_TYPE == 0){
		api.ajax({
			url: BASE_URL + 'App/User/teamList',
			method: 'post',
			data: {
				values: {
					userid: getUserId(),
					team: TEAM_TYPE
				}
			}
		},function(ret, err){
			if (ret && ret.code == 1) {
				console.log(JSON.stringify(ret))
				$$('.noData').addClass('aui-hide');
				var tpl = $$('#list_tpl').html();
				var tempFn = doT.template(tpl);
				$$('#list_html').html(tempFn(ret.data));
				api.parseTapmode();
				$$('#a').text(ret.ateam_count)
				$$('#b').text(ret.bteam_count)
			}else{
				$$('#list_html').html('')
				$$('.noData').removeClass('aui-hide');
			}
			$$('#a').text()
		});
	}else{
		api.ajax({
		  url: BASE_URL + 'App/User/teamList',
			method: 'post',
			data: {
				values: {
					userid: getUserId(),
					team: TEAM_TYPE,
					type: ITEM_TYPE
				}
			}
		},function(ret, err){
			if (ret && ret.code == 1) {
				$$('.noData').addClass('aui-hide');
				var tpl = $$('#list_tpl').html();
				var tempFn = doT.template(tpl);
				$$('#list_html').html(tempFn(ret.data));
				api.parseTapmode();
				$$('#a').text(ret.ateam_count)
				$$('#b').text(ret.bteam_count)
			}else{
				$$('#list_html').html('');
				$$('.noData').removeClass('aui-hide');
			}
			$$('#a').text()
		});
	}

}
</script>
</html>
